Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "/pages/home/home",
      iconPath: "",
      selectedIconPath: "",
      text: "首页"
    }, 
    {
      pagePath: "/pages/classify/classify",
      iconPath: "",
      selectedIconPath: "",
      text: "分类"
    },
    {
      pagePath: "/pages/department/department",
      text: "百货",
      iconPath: "",
      selectedIconPath: ""
    },
    {
      pagePath: "/pages/order/order",
      text: "订单",
      iconPath: "",
      selectedIconPath: ""
    },
    {
      pagePath: "/pages/mine/mine",
      text: "我的",
      iconPath: "",
      selectedIconPath: ""
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})